package com.jinzhi.jzweb.controller.moduleConfig;


import com.jinzhi.common.base.BaseController;

import com.jinzhi.common.utils.Result;
import com.jinzhi.jzweb.service.ExaminationResultsComService;
import com.jinzhi.jzweb.service.moduleConfig.CareStuSignUpComRealityService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 统计分析
 */

@Controller
@RequestMapping("/jzweb/examinationCostStatistic")
public class ExaminationCostStatisticController extends BaseController {

    final private CareStuSignUpComRealityService careStuSignUpComRealityService;

    final private ExaminationResultsComService examinationResultsComService;

    public ExaminationCostStatisticController(CareStuSignUpComRealityService careStuSignUpComRealityService, ExaminationResultsComService examinationResultsComService){
        this.careStuSignUpComRealityService = careStuSignUpComRealityService;
        this.examinationResultsComService = examinationResultsComService;
    }

    @GetMapping("/statisticAnalysis")
    @RequiresPermissions("jzweb:statisticAnalysis:statisticAnalysis")
    String statisticAnalysis(){
        return "jzweb/examinationCost/statisticAnalysis";
    }


    /**
     * 总得分占比
     * @return
     */
    @GetMapping("/totalScore")
    @RequiresPermissions("jzweb:totalScore:totalScore")
    String totalScore(){
        return "jzweb/examinationCost/totalScore";
    }


    /**
     * 得分区间分布
     * @return
     */
    @GetMapping("/scoreRange")
    @RequiresPermissions("jzweb:scoreRange:scoreRange")
    String scoreRange(){
        return "jzweb/examinationCost/scoreRange";
    }


    /**
     * 各模块得分情况
     * @return
     */
    @GetMapping("/moduleScore")
    @RequiresPermissions("jzweb:moduleScore:moduleScore")
    String moduleScore(){
        return "jzweb/examinationCost/moduleScore";
    }

    /** 基本信息统计数据 */
    @ResponseBody
    @GetMapping("/statisticAnalysisList")
    @RequiresPermissions("jzweb:statisticAnalysis:statisticAnalysis")
    public Result<?> statisticAnalysisList(){
        return careStuSignUpComRealityService.statisticAnalysis();
    }

    /** 各模块得分统计数据 */
    @ResponseBody
    @GetMapping("/moduleScoreList")
    @RequiresPermissions("jzweb:moduleScore:moduleScore")
    public Result<?> moduleScoreList(){
        return examinationResultsComService.moduleScoreList();
    }

    /** 总得分占比数据接口 */
    @ResponseBody
    @GetMapping("/totalScoreList")
    @RequiresPermissions("jzweb:totalScore:totalScore")
    public Result<?> totalScoreList(){
        return examinationResultsComService.totalScoreList();
    }


    /** 得分区间数据接口 */
    @ResponseBody
    @GetMapping("/scoreRangeList")
    @RequiresPermissions("jzweb:scoreRange:scoreRange")
    public Result<?> scoreRangeList(){
        return examinationResultsComService.scoreRangeList();
    }



}
